package com.ysd.resourceusestatistics.model;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.springframework.data.annotation.CreatedDate;

import lombok.Data;

/**
 * Statistcs
 */

 @Data
 @Entity
 @Table
public class Statistics {
//每天每个资源室插入当天的使用人次
//通过数据库的计划任务完成,也可通过任务调度完成
    @Id
@GeneratedValue(strategy = GenerationType.IDENTITY)//自增
private Integer id;
@ManyToOne(targetEntity = ReadRoom.class)
private Integer readRoom;
    private Integer num;//使用人次
    @CreatedDate
    private Date day;//日



}